package com.zaoniao.enstudy.infrastructure.mapper;

import com.zaoniao.enstudy.infracore.mapper.MyMapper;
import com.zaoniao.enstudy.infrastructure.po.ExamWordsPo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ExamWordsMapper extends MyMapper<ExamWordsPo> {

    /**
     * 删除所有数据.
     */
    void deleteAll();

    /**
     * 随机获取{examCount}个题目，且不再用户历史考试记录中.
     *
     * @param examCount 题目数
     * @param userId    用户Id
     * @return 考题库
     */
    List<ExamWordsPo> randomSelect(@Param("examCount") Integer examCount, @Param("userId") String userId);

}